<?php

/**
 * Created by PhpStorm.
 * User: zhangrongxiang
 * Date: 2017/6/7
 * Time: 下午5:25
 */
class A
{
    protected function pro()
    {
        return "pro";
    }

    public function pub()
    {
        return "pub";
    }
}

$a = new A();
$ext = function () {
    var_dump($this);
//     var_dump($this->pro()); //Error: Call to protected method A::pro()
    var_dump($this->pub());
};
$ext = $ext->bindTo($a);
var_dump($ext());

http://www.zhihu.com